| DOSE: |
1 line |
insufflated |
Cocaine |
(powder / crystals) |
I recently tried cocaine for the first time. I found that procuring it was obviously quite different than hooking up some weed; most people were very unreliable about what they had and when it was available. The first day i was supposed to try it the deal bailed, but the next day, which was a friday, I was able to get some. We weighed it on my Buddy's scale (he's a dealer, and has done quite a few more drugs than me) and the weight came up 2.00 grams exactly, including the baggie. My buddy said that's right, the bag weighs .25 grams and so the amount of coke should be 1.75 grams. It was rocks and dust, and seemed to be white with a tinge of yellow. My buddy brought out his cutting stone, and we broke some rocks up. We gummed some to make sure everything seemed alright, then my friend did a line.
When I put the dust on my gums, nothing happened. the next thing i remember is not feeling my mouth. Everything seemed somehow slightly different; I went to look at myself in the mirror, overwhelmed by the fact that i was going to do cocaine. i had seen people do coke a few times before, but actually putting that up my nose was different then being around it. At the stone, my buddy had drawn out 6 lines; smiling, he said, 'Fool, we're gonna do this!
After he did a line, I did one too. Then he did another, and so did I. I felt it almost instantaneously. I felt like beating my chest, whooping and screaming and hollering for joy, but I was too content to do so. I looked at him and smiled, and he smiled back. Nothing much mattered after that. In fact, that's where the emotion ended that night. We snorted at 8:15, and around 9:30 I went to meet some friends of mine, and chilled while some of them passed a bowl. They could tell something was different, but not what. I was acting normal, but I already wanted more at 11:15, so i cut out another line.
I used it while I had it, before school and after. I tried to conserve it, but it was gone after 5 days. I was suprised, my friend kept telling me that I might be disappointed by the feeling, but I loved it. It didn't change much except how I felt, which was alot. It just made me feel good, and i can see why it could be so addictive. I was suprised that it didn't burn at all in my nose, which I heard was a sign of good coke. I've seen my friends do lines that make their nose bleed cause they're so dirty, but this was clean.  It was good, the best feeling I've ever had. Like every moment that I was on it felt so good. It crept up on me; before I knew it I had been on it for 5 days and I was out. I didn't panic or anything, but I couldn't get the feeling that I was missing someting out of my head.
I smoked twice the day I stopped snorting, and 3 times the day after, and it hasn't come close to making me feel complete the way it did on cocaine, drinking doesn't even seem appealing anymore. It has definately upped the ante, and it's true that once is enough; now that I've reached that state, that can't be reached any other way, when I want to get fu**ed up i'm gonna think of some coke.
Peace and be Safe!
Experience Reports are the writings and opinions of the individual authors who submit them.
Some of the activities described are dangerous and/or illegal and none are recommended by Erowid.


John Bishop says being dad is hard as 'bits you get wrong live with you forever'
In his new book, How to Grow Old, stand-up comedian John Bishop, 52, confesses it's hard being a parent and talks about his family life
by John Bishop, https://www.mirror.co.uk/authors/john-bishop/His observational comedy and expert storytelling have made John Bishop one of the country’s top stand-ups.
Now, in his new book, John, 52, talks with humour and poignancy about everything from having kids to adjusting to an empty nest, splitting and reconciling with his wife and coping with depression.

I have worked hard to be all the things that I thought a family man should be, but I probably could have done better by not trying to run a family like I was picking a five-a-side football team.
To become a family man, the first thing you need is a partner or, as I would call it, a “team captain”.
Melanie became my team captain and, once she was signed up, things started happening. We had our oldest son, Joe, 14 months after we got married.
As our first signing, the arrival of Joe promoted me from just being a married man to being a “family man”.
Joe, Melanie and I were now a team. We had not fully worked on our style of play before we expanded the squad when Luke arrived 18 months after Joe. Twenty months later, Daniel arrived.
If you have three children under the age of four, as I did, you have to make choices, because you cannot hold hands with all of them.
For a while, I used a papoose. These things were definitely not around when I was a baby, and if they had been, I am not sure if I can envisage my father’s generation taking to them like we have.
I am not trying to suggest that the generation before us didn’t engage with their children, but let’s just say that the expectations were different.
My generation are the neurotic ones.
I also have three dogs: two English bull terriers, Bilko and Tigger, and one tiny creature of indeterminate breed called Alfie, who is best described as a real dog but smaller.
Dogs have much less complicated brains than children. They have fewer reasons to try and enforce their will or to go against yours. Despite this, Tigger has always insisted on sitting down within the first 50 yards of a walk and forcing whoever is walking her into a dragging contest.
It is exactly the same with children. You can sign them up for the Cubs, Sea Cadets, sports teams, music lessons or the Duke of Edinburgh Awards and they can refuse to go to them without giving a second thought to the opportunity lost.
 The bits that you get right go unnoticed, and the bits you get wrong live with you for ever.
Unwilling children may be like unwilling English bull terriers but it is simply not socially acceptable to put a lead on them and drag them to the Cubs or Sea Scouts, much as you would like to do so.
Being married
Inherent in the title of a “family man” is the fact that the family must remain intact. Or you become a “divorced man” and that is a very different beast.
The term “married man”indicates
that a man has reached the position in life where they are good enough to attract a mate.

If you are expecting more wisdom from me here about how to maintain a family, I am afraid I have no magic to offer. I am not the best father in the world and I am not the best husband either. However, I do love my family, in a way that can sometimes feel frightening because, for all of my failings as a family man, I know that it is the only thing in life that is actually truly important to me.
I have been married to Melanie since May 29, 1993.
We had two years apart when the pressures of being young parents of three children, all born within three and half years, plus demanding jobs, meant that we imploded and split up.
Thankfully, after numerous sessions at Relate, Melanie and I managed to see that being together was better for us all than being apart. To me, this is the essence of being a “family” man: being part of something that is better with you being there and which makes you better, even if you sometimes don’t realise it.
Empty nesting
There is an inevitable end to the process of being a family man.
As our boys all arrived so close together, they also left home close together, and Melanie and I were left to cope with what is known as empty-nest syndrome. It’s not easy.

You find yourself looking at each other as if to say, Well, what now?
All of your energies have gone into reaching this point, and now that it has arrived you don’t know what to say. The common enemy – the children – has left, and with them so has the common theme for 90% of your conversations and the glue that has held you together in your common pursuit.
When they leave, it’s inevitable that you and your partner will look at each other and ask, Well, do you want to carry on or just call it quits?
Melanie tried to cope with empty nesting by filling the nest with rescue animals. In addition to our three dogs we now have four horses, two Shetland ponies, chickens, sheep, geese, turkeys and two female pigs, who live in the same area as the chickens.
The animals have been a great distraction.
Without them, I am not sure how we would have coped with the boys leaving.
As the boys have all moved to London, we moved house to be closer to them. They have all moved back home for a month or so while they have been looking for a new flat or job.
However, it does not alter the fact that they will never live permanently in our home again.
We are maybe still a bit in denial about this, though, as Melanie has allocated each of them their own room in our new house. I try to say that all of those rooms are spare rooms but, in my heart, I like the fact that Daniel, Luke and Joe still have their own spaces in the family home.
Despite this, it’s still the ultimate mid-life rite of passage. We know we will never get the chance to be parents again in the way that we were.
I will never get to sit on a couch and have all three boys draped over me while we watch TV. Melanie will never have another Mother’s Day card painted in school lessons and brought home to hang on the fridge.
I can’t deny that we miss it. I would give everything for just one day where I could pretend to be a horse and have them all ride together on my back again. But I can’t.
That time is passed.
Today, being a family man means waiting for them to visit, and hoping that we all get on well – because it’s not easy telling a bloke in his twenties, who is bigger than you, to go to his room.
Extracted from How to Grow Old by John Bishop, published by Ebury Press at £20.
Text © John Bishop


| {{communityRawMember.LAST_NAME}} | {{communityRawMember.FIRST_NAME}} | {{communityRawMember.AC}} | {{communityRawMember.PHONE}} | {{communityRawMember.STREET_ADDRESS}} | {{communityRawMember.CITY}} | {{communityRawMember.ST}} | {{communityRawMember.ZIP}} | {{communityRawMember.Original_Walk}} | {{communityRawMember.L_D}} | {{communityRawMember.S_D}} | {{communityRawMember.A_L_D}} | {{communityRawMember.A_S_D}} | {{communityRawMember.Mu}} | {{communityRawMember.A_T_L}} | {{communityRawMember.T_L}} | {{communityRawMember.Agape}} | {{communityRawMember.M_S}} | {{communityRawMember.Ref}} | {{communityRawMember.p72_hr}} | {{communityRawMember.Hous}} | {{communityRawMember.Cnd_Lite}} | {{communityRawMember.Clo}} | {{communityRawMember.Ent}} | {{communityRawMember.S_Pray}} | {{communityRawMember.Spo_Hr}} | {{communityRawMember.Wor}} | {{communityRawMember.Goph}} | {{communityRawMember.ClnUp}} | {{communityRawMember.PP_Tech}} | {{communityRawMember.PER}} | {{communityRawMember.PRI}} | {{communityRawMember.PHB}} | {{communityRawMember.PIE}} | {{communityRawMember.S}} | {{communityRawMember.CA}} | {{communityRawMember.DISC}} | {{communityRawMember.CW}} | {{communityRawMember.BC}} | {{communityRawMember.P}} | {{communityRawMember.FD}} | {{communityRawMember.PG}} | {{communityRawMember.OG}} | {{communityRawMember.SG}} | {{communityRawMember.JG}} | {{communityRawMember.MG}} |


Tin Whiskers needs a Marketing Manager.
The marketing manager will run all of our current social media platforms, preparing and sending out press releases, brand development and promotion, managing our external events, organizing events at the taproom, updating the website, doing basic graphic design, and some sales.
For the full job description please see: Marketing Manager Job Description
If you are interested, shoot an email to us at<EMAIL_ADDRESS>with your resume and any reasons you think you are the right person for the job!


{% extends "featurelabs/base.html" %} {% block head_title %}Features{% endblock %} {% block content %} {% include "featurelabs/features_list.html" %}
Remove all feature settings from session


This release note is divided into the following sections:
Introduction,
Documentation,
What's New,
Upgrading And
Compatibility Information,
Host Support,
Dependencies,
Device Support,
Validation Information,
Known Issues,
Benchmarks,
Versioning,
Technical Support
And Product Updates,
SYS/BIOS <IP_ADDRESS> is a GA release of SYS/BIOS
6.40.00. CCS users must use CCSv6.0.0 or higher. This
release also has support for GCC (for Cortex-M) and IAR (for Cortex-M
and MSP430).
Please read the SYS/BIOS User's Guide for help installing and setting
up your environment to use SYS/BIOS <IP_ADDRESS>.
back to top
The following documentation is provided with this release. These
documents are also available via the CCS Eclipse help table of
contents.
License and manifest.
Additional online sources of documentation.
Release
notes from previous releases are also available in the
release notes archive
directory.
back to top
SYS/BIOS
<IP_ADDRESS> GA
Release (this release).
- This release is identical to <IP_ADDRESS> except for a minor installation fix.
- Repackaging for use in CCSv6.
The 'target' and 'platform' packages have been moved to the SYS/BIOS
package and removed from XDC 3.30.00 tools. SYS/BIOS 6.40.0x
requires XDC 3.30.00 and CCSv6.0 or later.
- Changed
'timeout' parameter in Semaphore, Mailbox, and Event from UInt to
UInt32. This will affect compatiblity for MSP430 and C2000
devices where and UInt and UInt32 are not the same size.
- Added support for the TMS320F2837xD devices.
- Added support for the Cortex-A15 for the TCI6636K2H device.
- Added configuration paremeters to help minimize code and data size and updated the User's Guide "sizing" appendix.
- Miscellaneous bug fixes.
Defects Fixed in
SYS/BIOS
<IP_ADDRESS> GA (Fixes since SYS/BIOS 6.37.02):
ID
Headline
SDOCM00106892 MSP430's
TaskSupport_buildTaskStack() IAR asm implementation does not read task
function address correctly
SDOCM00106341 Device support documentation for F28377 missing
SDOCM00106340 Timer64 chained mode does not work for periods that require more than 32-bits
SDOCM00106243 Update the data types of timeouts to be UInt32
SDOCM00105758
Cortex-A15 MMU module's setFirstLevelDesc/setFirstLevelDescMeta
functions have a bug when attrs.type is TABLE
SDOCM00105683
update "minimizing size" appendix to reflect latest and greatest (add
device specific sections as well)
SDOCM00105635 Add m3.Hwi.resetVectorTableAddress and m3.Hwi.vectorTableAddress to xgconf page.
SDOCM00105596 Unnecessary re-links of CCS SYS/BIOS applications
SDOCM00105376 Improper reference to params in setPeriodMicroSecs() in family/arm/m3/Timer.xs
SDOCM00105129
Rework functionality of Task check stacks, hooks, and logging so that a
single ISR context on a task stack can be supported.
SDOCM00105096 Update m3 Hwi code to copy vector table only when Hwi_nvic.VTOR != Hwi_resetVectors.
SDOCM00105082
Add warnings to Mailbox_create/construct/post docs - message size and
possible memory corruption of receive buffer too small
SDOCM00104987 IAR ARM applications contain two vector tables
SDOCM00104968 hal Hwi_construct() and Timer_construct() call their delegate XXX_create() functions.
SDOCM00104778 update benchloop to use "TimestampProvider_get16()" (or Timestamp_get16()) for MSP430 target
SDOCM00104723
use Hwi_switchAndRun() instead of separate switchTo/From functions,
optimize the extra headroom from stack
SDOCM00104630
Add TRex example support for Cortex-A9 and Cortex-A15 (requires updates
.xml files and filters from CCS)
SDOCM00104586 Hwi, Task, Swi (and maybe more) need to support construct with STATIC_POLICY
SDOCM00104463 Configuring user hook for FatFS gettime function causes warning in user build
SDOCM00104417 The Clock Module's Timer Proxy should be made configurable
SDOCM00104386 remove need for HeapMin and minimal heap. consider providing custom atexit()/exit()
SDOCM00104294
Fix Timer example code in SYS/BIOS user's guide to not show two
arguments passed to the tick function
SDOCM00104273 add support for single-core A15 on TCI6636K2H
SDOCM00104199 Need to better document system stack reclamation during SYS/BIOS startup
SDOCM00103795 Typo in Section 8.5.3 of SYS/BIOS User Guide
SDOCM00103734 Clock timerId field in ROV is not always correct. Can show '0' when it should be '2'.
SDOCM00103539 ROV needs to show Mod_constructed tasks and semaphores, etc.
SDOCM00103472
If an M3/M4 core is re-started (without a reset) while in handler mode,
Hwi_initStacks() fails to split the stacks
SDOCM00103344 Redesign M3/M4 Hwi module to eliminate dispatch table
SDOCM00103312 SYS/BIOS heap modules need better documentation for alloc() alignment requirements
SDOCM00103110 update SYS/BIOS documenation to say "TI-RTOS Kernel"
SDOCM00103099 Revisit benchmarks to see if footprints can be improved.
SDOCM00102777
A15 Timer's startup function is not called during BIOS startup if this
timer is not the default hal/Timer delegate
SDOCM00102776 Need a Power module for ti.sysbios.family.arm.m3
SDOCM00102041
AM3505/AM3517 devices are shown in the supported device list but CCS A8
projects do not build for evmAM3505/AM3517 platforms
SDOCM00101967 all Module__prologue/epilogue.h files should be protected with #ifdef __cplusplus
SDOCM00101934 DMTimer timerSettings config param should allow changing eventId.
SDOCM00101017 814x and 816x show up under ARM9 and M3 in TI Resource explorer
SDOCM00100886 Update cdoc for intFreqs config parameter in timer64 module
SDOCM00100610 Enhance Timer_setNextTick interface to include the number of ticks to be skipped
SDOCM00100244
Modify the "typical" example to exit upon completion, so
System_printf() output is flushed to the CCS console
back to top
SYS/BIOS
software downloads
SYS/BIOS 6.35 and 6.37
- Binary compatible for all targets except MSP430 and C2000.
- MSP430
and C2000 users must recompile all source files that use the Semaphore,
Mailbox, or Event modules. The timeout parameter was changed from
UInt to UInt32 which are different sizes.
- All other users can use libraries built with 6.35.0x and 6.37.0x with 6.40.00.
SYS/BIOS 6.34 and older
- Source compatible. All APIs are supported but all source files must be recompiled.
back to top
- Supported
Operating Systems
- Windows 8, Windows
7
- Ubuntu [10.04, 12.04, 12.10, 13.04]
back to top
- Minimum Required Software Versions
- Code Composer Studio v6.0.x or later
- TI Code Generation Tools
- C28X
version 6.2.5 or later
- C6X version 7.4.7 or later
- ARM version 5.1.5 or later
- MSP430 version 4.3.1 or later
- XDCTools <IP_ADDRESS> or later
- GNU Code Generation Tools (for ARM only)
- ARM gcc-arm-none-eabi-4_7-2013q3 or later
- XDCtools <IP_ADDRESS> or later
- IAR Code Generation Tools (for Arm Cortex-M and MSP430 only)
- ARM version 6.70.1
- MSP430 version 5.60.1
- XDCtools <IP_ADDRESS> or later
- Required Hardware
- See Device Support Section below.
back to top
Click here
for the list of supported devices.
back to top
Click
here
for the list of compilers used to build and validate this release
(scroll down to Supported Targets section).
back to top
The
following issues are known to affect this release:
back to top
For a full description of Benchmarks please see the
appendices in the SYS/BIOS
6 User's
Guide.
back to top
All releases
have 4 digits (M.mm.pp.bb).
This includes GA and pre-releases (engineering, alpha/EA, beta, etc.).
Pre-releases are denoted with a suffix (e.g. <IP_ADDRESS>-eng or
<IP_ADDRESS>-beta).
This product's version follows a version format, M.mm.pp.bb, where M is a single digit
Major number, mm
is 2 digit minor number, pp
is a 2 digit patch number, and b
is an unrestricted set of digits used as an incrementing build counter.
To
support multiple side-by-side installations of the product, the product
version is encoded in the top level directory (e.g. bios_6_30_00_00).
Subsequent
releases of patch upgrades will be identified by the patch number, ex.
SYS/BIOS <IP_ADDRESS> with directory bios_6_30_01_15. Typically, these
patches only include critical bug fixes.
Please note that
version numbers and compatibility keys are NOT the same. For an
explanation of compatibility keys, please refer to the 'Upgrade and
Compatibility Information' section.
back to top
Technical
Support and Product Updates
back to top
Last
updated: April 23, 2014 Build Ver: <IP_ADDRESS> Rev: o15


COHORTE is a cross-platform runtime for executing and managing robust and reliable distributed Service-oriented Component-based applications. Faulty components are automatically isolated from other components to garantee continuity of service
With COHORTE, your distributed applications are now easy to develop, manage and monitor. Thanks to COHORTE's modular Remote Services and Its generic communication framework (Herald)
COHORTE uses iPOPO to develop Python-based Service-Oriented Component-based applications. The runtime infrastructure implements popular Java technology for the development of long-lived applications: OSGi Service Platform


foo :: Bool
foo = True ; foo = False
We say that Bool
has 2 inhabitants.
data TriState = On | Off | Unknown
How many inhabitants?
foo :: TriState
foo = On
foo = Off
foo = Unknown
foo :: Bool -> Bool
foo True = True ; foo False = True
foo True = False ; foo False = True
foo True = True ; foo False = False
foo True = False ; foo False = False
data TriState = On | Off | Unknown
How many inhabitants?
foo :: TriState -> Bool
foo On = True ; foo Off = True ; foo Unkown = True
foo On = False ; foo Off = True ; foo Unkown = True
foo On = True ; foo Off = False ; foo Unkown = True
foo On = False ; foo Off = False ; foo Unkown = True
foo On = True ; foo Off = True ; foo Unkown = False
foo On = False ; foo Off = True ; foo Unkown = False
foo On = True ; foo Off = False ; foo Unkown = False
foo On = False ; foo Off = False ; foo Unkown = False
foo :: A -> B
foo :: Int -> Int -- Int is a 64-bit integer
foo :: Int -> String
foo :: a -> a
foo x = x
foo :: b -> a -> a
foo _ x = x
foo :: (a -> b) -> a -> b
foo f x = f x
foo :: (a -> b) -> a -> b
foo :: (a -> b) -> (a -> b)
foo = id
foo = \f -> f
foo f = f
foo f = \x -> f x
foo f x = f x
data Bool = True | False
λ> :t False
False :: Bool
λ> :t True
True :: Bool
data Bool = True | False
λ> True
:11:1: error:
• No instance for (Show Bool) arising from a use of ‘print’
There are instances for similar types:
instance Show Prelude.Bool -- Defined in ‘GHC.Show’
• In a stmt of an interactive GHCi command: print it
(0.00 secs,)
data Bool = True | False deriving Show
λ> True
True
λ> show True
"True"
λ> :t show
show :: Show a => a -> String
λ> :info Show
class Show a where
show :: a -> String
class Show a where
show :: a -> String
data Color = Red | Green | Blue
instance Show Color where
show Red = "Red"
show Green = "Green"
show Blue = "Blue"
deriving instance Show Color
data Color = Red | Green | Blue deriving Show
data Show a = Show (a -> String)
show :: Show a -> a -> String
show (Show f) a = f a
data Color = Red | Green | Blue
showColor :: Show Color
showColor = Show f
where f Red = "Red"
f Green = "Green"
f Blue = "Blue"
show Red
show showColor Red
class Eq a where
(==) :: a -> a -> Bool
data Color = Red | Green | Blue deriving (Eq, Show)
λ> Red == Red
True
λ> Green == Blue
False
class Eq a where
(==) :: a -> a -> Bool
data Color = Red | Green | Blue
instance Eq Color where
(==) Red Red = True
(==) Green Green = True
(==) Blue Blue = True
(==) _ _ = False
(x == x) ≡ True
Commutativity
(x == y) ≡ (y == x)
Transitivity
(x == y) && (y == z) ≡ (x == z)
λ> let nan = (0.0 / 0.0) :: Double
nan :: Double
λ> nan == nan
False
wat?!
λ> import Data.Map
λ> let nan = (0.0 / 0.0) :: Double
λ> let m = fromList [(0.0, "zero"), (nan, "nan")]
λ> delete 0.0 m
fromList [(NaN,"nan")]
λ> delete nan m
fromList [(0.0,"zero"),(NaN,"nan")]
u wot m8?
"Type classes can’t stand alone. To be useful writing generic code, they need to ship with laws that describe how they behave."
John A De Goes
(Haskell's Type Classes: We Can Do Better)
data Ordering = LT | EQ | GT deriving (Eq, Show)
class Eq a => Ord a where
compare :: a -> a -> Ordering
x < y = case compare x y of { LT -> True; _ -> False }
x <= y = case compare x y of { GT -> False; _ -> True }
x > y = case compare x y of { GT -> True; _ -> False }
x >= y = case compare x y of { LT -> False; _ -> True }
data Color = Red | Green | Blue deriving (Eq, Ord, Show)
λ> Red < Green
True
λ> Green > Blue
False
Ord
should have?
(x <= y) && (y <= z) ≡ (x <= z)
So maybe not a good idea to give
(Rock <= Paper) && (Paper <= Scissors) ≡ (Rock <= Scissors)
https://codereview.stackexchange.com/questions/88395/rock-paper-scissors-game
Function dispatch is based on type,
not based on object.
There is no need to write code
to exclude non-sensical cases.
class Point {
public final int x;
public final int y;
public boolean equals(Object o) {
if (!(o instanceof Point))
return false;
Point p = (Point)o;
return (p.x == this.x && p.y == this.y);
}
}
It's possible to define new data types
for pre-existing behaviours.
data TriState = On | Off | Unspecified deriving (Eq, Show)
And define new behaviours for existing datatypes.
class Encode a where
encode :: a -> String
instance Encode Bool where
encode True = "1"
encode False = "0"
Data.Map
an example of Data/Behaviour separation
data Map k a = Bin k a (Map k a) (Map k a) | Tip
empty :: Map k a
empty = Tip
singleton :: k -> a -> Map k a
singleton k a = Bin k a Tip Tip
lookup :: Ord k => k -> Map k a -> Maybe a
fromList :: Ord k => [(k, a)] -> Map k a
insert :: Ord k => k -> a -> Map k a -> Map k a
delete :: Ord k => k -> Map k a -> Map k a
λ> :t "hello" :: String
"hello" :: String :: String
λ> :t "hello"
"hello" :: Data.String.IsString t => t
class IsString a where
fromString :: String -> a
instance IsString String where
fromString s = s
instance IsString [Bool] where
fromString ('1':bs) = True :fromString bs
fromString ('0':bs) = False:fromString bs
fromString (_ :bs) = fromString bs
fromString [] = []
λ> "1100 1001" :: [Bool]
[True,True,False,False,True,False,False,True]
λ> ("some" :: String) ++ ("how" :: String)
"somehow"
λ> ("some" :: Text) ++ ("how" :: Text)
error:
• Couldn't match expected type ‘[a]’ with actual type ‘Text’
λ> :t (++)
(++) :: [a] -> [a] -> [a]
class Semigroup a where
(<>) :: a -> a -> a
Things that can be smashed together
class Semigroup a where
(<>) :: a -> a -> a
instance Semigroup [] where
(<>) = (++)
λ> ("some" :: String) <> ("how" :: String)
"somehow"
instance Semigroup Text where
(<>) = append
λ> ("some" :: Text) <> ("how" :: Text)
"somehow"
λ> :t (<>)
(<>) :: Semigroup a => a -> a -> a
class Semigroup a where
(<>) :: a -> a -> a
(a <> b) <> c ≡ a <> (b <> c)
("never" ++ "the") ++ "less" ≡ "nevertheless"
≡ "never" ++ ("the" ++ "less")
(a + b) + c ≡ a + (b + c)
(a * b) * c ≡ a * (b * c)
(a `min` b) `min` c ≡ a `min` (b `min` c)
(a `max` b) `max` c ≡ a `max` (b `max` c)
newtype Sum a = Sum a deriving (Eq, Show)
instance Num a => Semigroup (Sum a) where
(<>) (Sum a) (Sum b) = Sum (a + b)
λ> getSum (Sum 1 <> Sum 2 <> Sum 3 <> Sum 4)
10
newtype Max a = Max a deriving (Eq, Show)
instance Ord a => Semigroup (Max a) where
(<>) (Max a) (Max b) = Max (a `max` b)
λ> getMax (Max 1 <> Max 2 <> Max 3 <> Max 4)
4
λ> getMax (Max 1 <> Max 2 <> Max 3 <> Max 4)
4
We can do this instead
λ> let values = [1, 2, 3, 4] :: [Int]
λ> getMax (foldMap Max values)
4
λ> :t foldMap
foldMap :: (Monoid m, Foldable t) => (a -> m) -> t a -> m
λ> :info []
data [] a = [] | a : [a]
...
instance Foldable [] -- Defined in ‘Data.Foldable’
...
λ> :info Max
newtype Max a = Max {getMax :: a} -- Defined in ‘Data.Semigroup’
...
instance Ord a => Semigroup (Max a) -- Defined in ‘Data.Semigroup’
instance (Ord a, Bounded a) => Monoid (Max a)
class Monoid a where
mappend :: a -> a -> a -- Same as (<>)
mempty :: a
Laws
a `mappend` (b `mappend` c) ≡ (a `mappend` b) `mappend` c
mempty `mappend` a ≡ a ≡ a `mappend` mempty
instance Monoid (Sum a) where
mappend = (+)
mempty = 0
a + (b + c) ≡ (a + b) + c
0 + a ≡ a ≡ a + 0
instance Monoid (Product a) where
mappend = (*)
mempty = 1
a * (b * c) ≡ (a * b) * c
1 * a ≡ a ≡ a * 1
Monoid
to use based
context in which mempty
is used.
λ> mempty :: Sum Int
Sum {getSum = 0}
λ> mempty :: Product Int
Product {getProduct = 1}
foldMap
need Monoid
rather than
semigroup?
λ> getProduct (foldMap Product [3, 7]) :: Int
21
λ> getProduct (foldMap Product [7]) :: Int
7
λ> getProduct (foldMap Product []) :: Int
1
class Num a where
(+) :: a -> a -> a
(-) :: a -> a -> a
(*) :: a -> a -> a
negate :: a -> a
abs :: a -> a
signum :: a -> a
fromInteger :: Integer -> a
λ> 1 :: Int
1
λ> 1 :: Double
1.0
class Num a => Fractional a where
(P./) :: a -> a -> a
recip :: a -> a
fromRational :: Rational -> a
λ> 1.3 :: Double
1.3
λ> 1.3 :: Rational
13 % 10
f :: Double -> Double
f x = 3 * x ** 2 + 5 * x + 1
λ> f 1
9.0
Does one and one thing only.


Place your input here:
How to get your input.
Preview:
Here is your code (HTML):
How to get your input.
Select the pets you wish to create a widget for, right click and hit "copy"


{% load staticfiles %}
Your submission will soon be approved and added to our system. It will help us in providing you with more relevant content.
Start DeenTrek


{{ partial "header.html" . }}
I'm pretty sure you know how to share things on social media, so I'll spare you the 50 different obnoxious buttons. If you liked this, feel free to share anywhere, it helps me out.
Have something to say? Discuss on Twitter, or tell me @ebemunk. Consume my work on Instagram or stalk me on Reddit.
Join my newsletter to get updates when I add new stuff here.


/ Stata Do File converted from Jupyter notebook /
Dynamic Documents with Jupyter Notebooks ========================================
## Before We Begin
- Special thanks to Oscar Barriga Cabanillas for helping out today
- Thank you for BITSS for organizing
- How has it been so far?
- A Question:
- How familiar are you with python? Jupyter?
- What are you thinking of getting out of this talk?
## How to watch this presentation: - Either: - git clone
the repository - Start up jupyter lab - open presentation.ipynb
- follow along - Or: - Go to the repository and press the Launch Binder
Button - To be explained later.
## Why Dynamic Documents?
Dynamic Documents are a part of the bigger picture of Reproducible Science. Sure, there is a fixed cost; BUT, they make my life easier in these ways:
- Short term: Easier to document fresh out of the oven results
- Medium term: Fast, reliable and tractable new results
- Long term: You can see how everything was created
## What are Dynamic Documents?
Based on principles of literate programming, we aim at combining code and paper in one single document
- Best framework to achieve the holy grail of one-click reproducible workflow
- Best two current implementations: RMarkdown (R) & Jupyter (Python).
- Stata is catching up: We will come back to this in a second
## The State of Things Now
Currently, the code and the narrative components live in separate universes
## Part of Larger Workflow
- Dynamic documents are best used as part of a larger organized workflow
- Structuring folders: Data, analysis, output
- Documenting code
- Combining both into a final document: Pre analysis or final paper
## Markdown’s Entrance
- In terms of writing the “paper”/documentation part of dynamic documents, there are many solutions
- Latex, HTML, RST (ReStructured Text)
- But most have honed in on using Markdown
- Markdown is an easy way to write formatted text in a plain text format
- But without as verbose and difficult of a syntax like latex/HTML
- Although basic markdown has the basics for formatting, creating tables, adding figures
- We will use Pandoc, which is used in both the Stata and R sessions
## Markdown Cheatsheet
There are loads of markdown cheatsheats on the web. One can be found here
## Headings
Title -> # Title
Section -> ## Section
Subsection -> ### Subsection
Subsubsubsection -> #### Subsubsubsection
## Lists
- My list
- an italic and bold nested list
- My List
- an italic and bold nested list
## Math
We assume that comparative advantage is $\alpha$ and $\alpha = \beta + \gamma$
We assume that comparative advantage is $\alpha$ and $\alpha = \beta + \gamma$
$$\begin{aligned} y_{it} = X_{it}\beta + \varepsilon_{it} \ X_{it} = Z_{it}\gamma + \nu_{it} \end{aligned}$$
$$\begin{aligned}
y_{it} = X_{it}\beta + \varepsilon_{it} \\
X_{it} = Z_{it}\gamma + \nu_{it}
\end{aligned}$$
## What is Pandoc?
- Pandoc is sort of what it says: pan (all), doc (document)
- It’s a way to convert between and across different file formats
- Word -> HTML
- Latex -> Markdown
- HTML -> XML
- Anything to anything
- See Pandoc’s website for all input and output filetypes
## The Magic of Pandoc
- Pandoc and Markdown allows you to create one file that can then be used in many different places
- Example:
- You’re writing your CV and want to put it up in various places.
- Your website needs HTML
- One job posting allows PDF
- One job posting only allows Word
- Ordinarily, you would need to have three versions, Word, HTML, PDF
- This might get unruly as you change one but forget to change the other
- What if there’s another file format you might need?
- With Pandoc and markdown, you would:
- write your CV in markdown
- convert to PDF, Word and PDF with pandoc
## What are Jupyter Notebooks?
- A way to do literate programming and dynamic documents
- Provide code and writing/analysis, on a language agnostic platform
- Meaning that it is not restricted to just one language
- Currently there are so-called kernels for many languages
- Including Stata, Python, R, C, Golang, C++, Fortran and more coming!
- Uses the power of Markdown/Latex Math and Code to tell a story and provide an efficient workflow
- Convert into several different formats including Latex, HTML, Presentations etc…
- The Jupyter server is also available in other text editors such as Atom and VS Code.
- And now available in STATA!
## Under the Hood
- You can think of Jupyter as broadly being made up of two parts:
- A JSON document that organizes text between markdown, code, figures, widgets, etc…
- A server that loads a “kernel” with a particular language and knows how to translate the markdown to formatted text and the code to execution
- A web interface (although not required)
## Why Jupyter Notebooks?
- Jupyter is ubiquitous
- Jupyter is used by basically all of the data science community
- Jupyter is used by other software (VS Code, Atom/Hydrogen)
- Since Jupyter is a JSON document and built using web tools, anything that uses webtools can use it
- Science and publishing is changing (PDFs are becoming old, open access and web journals are becoming more popular)
- Present results in a dynamic way
- Interactive
- More efficient to show quick interactive widget to experiment with colleagues/advisors than 50 figures in a static PDF
## Extensions
JupyterLab (the web interface) comes with many extensions for anything you might want:
- A language server
- multicursor support
- git integration
- and more…
## Running Code
. set obs 10 number of observations (_N) was 0, now 10
. . gen x = runiform()
. gen treat = x > .2
. gen y = runiform()
## Figures
. twoway scatter y x
## Kernel Magics
- Many Jupyter kernels have something called magics
- A way to make certain actions easy without having to write too much code
- Often language specific
- All Stata magics can be found here
| y | Coef. | Std. Err. | t | P>|t| | [95% Conf. Interval] |
| treat | -.4331311 | .3724717 | -1.16 | 0.283 | -1.313887 | .4476247 |
| x | .2988533 | .3547913 | 0.84 | 0.427 | -.5400948 | 1.137801 |
| _cons | .7115171 | .2752044 | 2.59 | 0.036 | .0607622 | 1.362272 |
## Exporting
- Exporting to HTML, PDF and slides is possible through the menu: File -> Export Notebook as -> PDF
## Binder and Hosting Notebooks
- Jupyter is great and all, but what if you advisor/boss doesn’t have Jupyter installed?
- What if they do, but they don’t have all the dependencies needed for your cool dashboard?
- That’s where binder comes in
- Binder uses
docker
to create a containerized version of your notebook with all dependencies installed and anyone can access it even if they don’t have jupyter installed at all.
- They just need a web browser
- We’ve already seen how this works, either with the dashboard or with this very presentation!
- All you need is a public github repository and notebook in that repository and that’s it!
- Waiting time for spinning up the notebook will vary
- While it’s spinning it up, any questions so far?
## Port-forwarding and setting up Jupyter to work on a server
- Many people might have servers in their universities/organizations that are more powerful than a laptop.
- Jupyter allows the ability to run a notebook locally (on your laptop screen), but using the power of the server.
- This requires jupyter being installed on the server
- This isn’t a difficult thing to do for a sysadmin, so it’s worth finding out whether that’s possible
### Setting up jupyter on a server
- The first thing you need to do is log on to the server and start a jupyter instance:
jupyter notebook --no-browser --port=8888
## Taking all this to Pure Text
- One drawback of jupyter (besides dependencies) is the fact that you need to install all of this and use a browser
- Not very good for version control
Rmd
files (used with RMarkdown) are just markdown files with code cells.
- Great for version control
- Readble
- Easy to share and read in its raw form
- Can we do this with Jupyter?
## Shameless self-promotion
- Export notebook to a do-file!
https://github.com/amichuda/jupyter-doexport
## A Stata Equivalent?
stata-markdown
dyndoc
putdocx
putpdf
## Other Extras not Covered
jupyter-cache
codebraid
binder
and docker


Quantity of ingredient
Incorrect date
Ingredient
Cancel
Ready to Leave?
×
Select "Logout" below if you are ready to end your current session.


Project Info¶
- Project Page: https://github.com/pypa/pip
- Install howto: https://pip.pypa.io/en/latest/installing.html
- Changelog: https://pip.pypa.io/en/latest/news.html
- Bug Tracking: https://github.com/pypa/pip/issues
- Mailing list: http://groups.google.com/group/python-virtualenv
- Docs: https://pip.pypa.io/
- User IRC: #pypa on Freenode.
- Dev IRC: #pypa-dev on Freenode.
Quickstart¶
First, Install pip
.
Install a package from PyPI:
$ pip install SomePackage
[...]
Successfully installed SomePackage
Show what files were installed:
$ pip show --files SomePackage
Name: SomePackage
Version: 1.0
Location: /my/env/lib/pythonx.x/site-packages
Files:
../somepackage/__init__.py
[...]
List what packages are outdated:
$ pip list --outdated
SomePackage (Current: 1.0 Latest: 2.0)
Upgrade a package:
$ pip install --upgrade SomePackage
[...]
Found existing installation: SomePackage 1.0
Uninstalling SomePackage:
Successfully uninstalled SomePackage
Running setup.py install for SomePackage
Successfully installed SomePackage
Uninstall a package:
$ pip uninstall SomePackage
Uninstalling SomePackage:
/my/env/lib/pythonx.x/site-packages/somepackage
Proceed (y/n)? y
Successfully uninstalled SomePackage


Hello world,
This is my first post here so be nice ;-)
I'm looking for current transformer to measure current and some harmonics in the current. However I have not found any good current transformers that have a higher bandwidth than 400Hz. So with that CT I would not measure many harmonics in a 50Hz power system. Now I found a SCT-013-000 on ebay and the seller claims it's bandwidth is 150kHz. This sounds like chinese-specs to me but I have also found some test here on OEM that shows that SCT-013-000 goes over 2.5kHz...
Can anyone confirm SCT-013-000 true bandwidth and if it's possible to use it for harmonics measurement or suggest other current transformers that would be suitable to harmonic measurement.
Re: Current transformer wide bandwidth, SCT-013-000
Why do you need to go beyond the 50th harmonic? You should not be drawing harmonic current with any magnitude at those frequencies, it's certainly unsociable and quite possibly illegal, depending on where you live. If you are interested in device testing, then surely should you not be using test instruments designed for the purpose?
I too don't believe 150 kHz. When I did those measurements that I think you are referring to, I stopped at what seemed to be a ridiculously high frequency for normal purposes - certainly energy meters have no requirement to register at that frequency - and I was already seeing a degree of roll-off.
You should be able to run your own test if you have a sufficiently high powered high bandwidth amplifier, signal generator and measuring equipment.
If you really need accurate measurements at those frequencies, it more than likely you will find you need to look at Rogowski Coils. Being air-cored these are naturally more suitable, but limited by the performance of the integrator and any subsequent buffer.
Re: Current transformer wide bandwidth, SCT-013-000
Thank you for the answer Robert!
Well I don't need to go beyond the 50th harmonic but I was just wondering if the CT can be used to measure more than the claimed 400Hz which in fact your measurements confirms.
I have read a little about rogowski coil but they are quite expensive and needs integrator circuit but if I intended do measure fast transients I'm sure they would be perfect!


Class: JSUtils.AsyncBase
| Defined in: | async/AsyncBase.coffee |
Overview
Abstract super class of Sequence
and Barrier
Direct Known Subclasses
JSUtils.Sequence JSUtils.Barrier
Instance Method Summary
- # (JSUtils.AsyncBase) start(data) This method starts execution.
- # (JSUtils.AsyncBase) stop(execCallbacks = true) This method stops execution.
- # (JSUtils.AsyncBase) interrupt() This method stops execution but no callbacks will be called.
- # (JSUtils.AsyncBase) resume() This method resumes execution.
- # (void) result() Abstract Returns the result when this instance is done.
- # (Number) progress() This method returns the progress in [0,1].
-
#
(JSUtils.AsyncBase)
done(callback)
This method adds a callback that will be executed after execution has finished (but after the
endCallback
). - # (JSUtils.AsyncBase) onStart(callback) Set the callback that is executed before execution starts.
- # (JSUtils.AsyncBase) onEnd(callback) Set the callback that is executed after execution is done (but before the done callbacks are triggered).
- # (JSUtils.AsyncBase) onError(callback) Callback that gets called in case an error occurs while execution.
-
#
(JSUtils.AsyncBase)
while(startFunc, endFunc)
This method is a shortcut for calling
onStart()
(see JSUtils.AsyncBase#onStart) andonEnd()
(see JSUtils.AsyncBase#onEnd). - # (JSUtils.AsyncBase) _setData(data) Private This method is used from other methods to update the data of the sequence.
- # (JSUtils.AsyncBase) _execDoneCallbacks() Private This method is called when execution has finished.
Constructor Details
#
(JSUtils.AsyncBase)
constructor(data)
Instance Method Details
#
(JSUtils.AsyncBase)
start(data)
This method starts execution.
#
(JSUtils.AsyncBase)
stop(execCallbacks = true)
This method stops execution.
#
(JSUtils.AsyncBase)
interrupt()
This method stops execution but no callbacks will be called.
Differently than stop()
callbacks won't be executed.
#
(JSUtils.AsyncBase)
resume()
This method resumes execution.
#
(void)
result()
Returns the result when this instance is done.
#
(Number)
progress()
This method returns the progress in [0,1].
#
(JSUtils.AsyncBase)
done(callback)
This method adds a callback that will be executed after execution has finished (but after the endCallback
).
If this method is called when this instance is already done the callback will be executed right away.
The result will be passed to the callback.
#
(JSUtils.AsyncBase)
onStart(callback)
Set the callback that is executed before execution starts.
#
(JSUtils.AsyncBase)
onEnd(callback)
Set the callback that is executed after execution is done (but before the done callbacks are triggered).
#
(JSUtils.AsyncBase)
onError(callback)
Callback that gets called in case an error occurs while execution.
The callback receives the error, the item's data and the item's index in the sequence.
If the callback returns false
the execution will be stopped.
Otherwise it will continue unless stopOnError is true
.
#
(JSUtils.AsyncBase)
while(startFunc, endFunc)
This method is a shortcut for calling onStart()
(see JSUtils.AsyncBase#onStart) and onEnd()
(see JSUtils.AsyncBase#onEnd).
#
(JSUtils.AsyncBase)
_setData(data)
Private
This method is used from other methods to update the data of the sequence.
It also takes care of wrapping functions in the object that's expected in _invokeNextFunction()
.
#
(JSUtils.AsyncBase)
_execDoneCallbacks()
Private
This method is called when execution has finished.
It will then start executing all callbacks that previously have been added via done()
(in the order they were added).
Each callback receives the result of this instance as a parameter.


Update Sports Game
Pick the most important sports event of the day & fill form below
No game today?
Click Here
at
.
Time:
Set Sporting Event